package com.yjc.drygoods.product.feign;

import com.yjc.common.to.SkuInfoTo;
import com.yjc.common.utils.R;
import com.yjc.drygoods.product.entity.SkuInfoEntity;
import com.yjc.drygoods.product.vo.SkuEsModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author yjc
 * @create 2022-09-07 15:50
 */
@FeignClient("drygoods-search")
public interface SearchFeignService {

    @PostMapping("/search/save/up/product")
    R saveSkuEsModels(@RequestBody List<SkuEsModel> skuEsModels);

    @PostMapping("/search/save/update/skuPrice")
    public R updateSkuPrice(@RequestBody List<SkuInfoEntity> skuInfos);

    @PostMapping("//search/save/down/all/sku")
    R downAllSku(@RequestBody List<Long> skuIds);
}
